<HTML><HEAD><TITLE>refine(++UpDown, ?SetVar)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>refine(++UpDown, ?SetVar)</H1>
Refine a set variable's domain
<DL>
<DT><EM>UpDown</EM></DT>
<DD>Atom ('up' or 'down').
</DD>
<DT><EM>SetVar</EM></DT>
<DD>A set variable.
</DD>
</DL>
<H2>Description</H2>
Pick the first element of SetVar's poss (lub\glb) and try to include it
		in its glb, or to definitely exclude it from the domain.<P>
		If heuristic UpDown is 'up' then inclusion is tried first; otherwise (down)
		exclusion is tried first.
<H3>Fail Conditions</H3>
Fails if Var can not be refined (it is either ground or both the inclusion
		and exclusion of the first element of its poss leads to a failure due to
		unsatisfied constraints).
<H3>Resatisfiable</H3>
Yes.
<H2>Examples</H2>
<PRE>
?- S `:: [a]+[b,c], refine(up,S), glb_poss(S,G,P).
G = [a,b], P = [c] ;
G = [a], P = [c] ;
no

?- S `:: [a]+[b,c], refine(down,S), glb_poss(S,G,P).
G = [a], P = [c] ;
G = [a,b], P = [c] ;
no
</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/set_labeling-2.html">set_labeling / 2</A>, <A HREF="../../lib_public/cardinal/set_labeling-1.html">set_labeling / 1</A>
</BODY></HTML>
